﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VersionManage.Logic
{

    /// <summary>
    /// 阿里对象存储
    /// </summary>
    public class AliObjectStorage
    {

        /// <summary>
        /// OSS相对路径加文件名 例:oss/file.txt
        /// </summary>
        public string OSSPath { get; set; }

        /// <summary>
        /// 文件名
        /// </summary>
        public string FileName
        {
            get;set;
        }

        /// <summary>
        /// 当前数据块在文件中的起始位置
        /// </summary>
        public long Index { get; set; }

        /// <summary>
        /// 数据
        /// </summary>
        public byte[] Data { get; set; }

        /// <summary>
        /// 文件总长度
        /// </summary>
        public long Length { get; set; }
    }

    /// <summary>
    /// 文件下载参数
    /// </summary>
    public class GetFileParameter
    {
        /// <summary>
        /// oss相对路径
        /// </summary>
        public string OssPath { get; set; }

        /// <summary>
        /// 下载起始位置
        /// </summary>
        public long Index { get; set; }

        /// <summary>
        /// 下载长度
        /// </summary>
        public int Count { get; set; }
    }

}
